{
 "cells": [
  {
   "cell_type": "markdown",
   "id": "e577d2ba",
   "metadata": {},
   "source": [
    "# 本周学习内容\n",
    "\n",
    "\n",
    ">1.安装配置python环境（anaconda，清华大学镜像）\n",
    ">>1.什么是绝对路径和相对路径？\n",
    ">>2.配置环境，相对路径有5个需要配置的，绝对路径根据自己的电脑进行配置\n",
    "\n",
    ">2.回顾：GitHub Desktop 如何实现本地与云端的连接\n",
    ">>1.克隆Gitee的仓库URL，到本地的指定文件路径，例如 D：/2022-2023/python\n",
    ">>上传 本地笔记到gitee仓库\n",
    "    > 3. 本周重点知识([jupyter notebook](https://jupyter.org/))\n",
    "    >> 1. 什么是IDE?（即集成开发环境）\n",
    "    >> 2. 如何打开jupyter notebook ？\n",
    "    >>> 1. cmd \n",
    "    >>> 2. cd 指定目录下\n",
    "    >>> 3. 输入：jupyter notebook\n",
    "    > 4. 注：前九周全部使用juoyter notebook（IDE）来做课堂和课后练习\n",
    "    \n",
    " # 2. 模块（工具箱-不需要知道怎么做的，只需要会用就可以了)\n",
    "    \n",
    "  > 1. 标准库（python团队自己开发出来的，想着有人如果用我的编程语言的话，常用的一些功能我已经准备好了）\n",
    "  >> 1. 使用标准库的方法： import 模块名称\n",
    "  >> 2. [标准库的库](https://docs.python.org/3/library/index.html)\n",
    "  > 2. 开源模块(anaconda为例)\n",
    "  >> 1. [开源模块](https://pypi.org/)\n",
    "  > 3. 自定义模块\n",
    "    "
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 1,
   "id": "969c8afa",
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "hello world`\n"
     ]
    }
   ],
   "source": [
    "print (\"hello world`\")"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 3,
   "id": "9bc5906c",
   "metadata": {},
   "outputs": [],
   "source": [
    "import time"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 4,
   "id": "872450d7",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "time.struct_time(tm_year=2022, tm_mon=9, tm_mday=7, tm_hour=18, tm_min=54, tm_sec=12, tm_wday=2, tm_yday=250, tm_isdst=0)"
      ]
     },
     "execution_count": 4,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "time.localtime()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 7,
   "id": "833dd818",
   "metadata": {},
   "outputs": [
    {
     "ename": "ModuleNotFoundError",
     "evalue": "No module named 'apple'",
     "output_type": "error",
     "traceback": [
      "\u001b[0;31m---------------------------------------------------------------------------\u001b[0m",
      "\u001b[0;31mModuleNotFoundError\u001b[0m                       Traceback (most recent call last)",
      "Input \u001b[0;32mIn [7]\u001b[0m, in \u001b[0;36m<cell line: 1>\u001b[0;34m()\u001b[0m\n\u001b[0;32m----> 1\u001b[0m \u001b[38;5;28;01mimport\u001b[39;00m \u001b[38;5;21;01mapple\u001b[39;00m\n",
      "\u001b[0;31mModuleNotFoundError\u001b[0m: No module named 'apple'"
     ]
    }
   ],
   "source": [
    " import apple"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "id": "12603464",
   "metadata": {},
   "outputs": [],
   "source": [
    "## 课本 P4 第一个项目 可以试一下"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "d0fddd3f",
   "metadata": {},
   "source": [
    "# 课后作业：\n"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 1,
   "id": "1be6e84a",
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "This minute seems a little odd.\n"
     ]
    }
   ],
   "source": [
    "from datetime import datetime\n",
    "\n",
    "odd=[ 1, 3, 5, 7, 9, 11, 13, 15, 17, 19, 21, 23, 25, 27, 29, 31, 33, 35, 37, 39, 41, 43, 45, 47, 49, 51, 53, 55, 57, 59 ]\n",
    "\n",
    "right_this_minute = datetime.today().minute\n",
    "\n",
    "if right_this_minute in odd:\n",
    "    print(\"This minute seems a little odd.\")\n",
    "else:\n",
    "    print(\"Not an odd minute.\")"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 5,
   "id": "4c130d2b",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "'darwin'"
      ]
     },
     "execution_count": 5,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    ">>> import sys\n",
    ">>> sys.platform"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 6,
   "id": "1ec38586",
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "3.9.12 (main, Jun  1 2022, 06:34:44) \n",
      "[Clang 12.0.0 ]\n"
     ]
    }
   ],
   "source": [
    ">>> print(sys.version)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 8,
   "id": "e19895e6",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "'/Users/liangmismacbook'"
      ]
     },
     "execution_count": 8,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    ">>> import os\n",
    ">>> os.getcwd()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 9,
   "id": "d7e82ed3",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "datetime.date(2022, 10, 19)"
      ]
     },
     "execution_count": 9,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    ">>> import datetime\n",
    ">>> datetime.date.today()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 10,
   "id": "10e18ebe",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "19"
      ]
     },
     "execution_count": 10,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    ">>> datetime.date.today().day"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 11,
   "id": "2937724e",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "10"
      ]
     },
     "execution_count": 11,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    ">>> datetime.date.today().month"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 12,
   "id": "8107bd83",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "2022"
      ]
     },
     "execution_count": 12,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    ">>> datetime.date.today().year"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 13,
   "id": "a62f77a8",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "'2022-10-19'"
      ]
     },
     "execution_count": 13,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    ">>> datetime.date.isoformat(datetime.date.today())"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 14,
   "id": "bef8d698",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "'13:39'"
      ]
     },
     "execution_count": 14,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    ">>> import time\n",
    ">>> time.strftime(\"%H:%M\")"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 15,
   "id": "eb9ef4b0",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "'Wednesday PM'"
      ]
     },
     "execution_count": 15,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    ">>> time.strftime(\"%A %p\")"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "id": "6562ef47",
   "metadata": {},
   "outputs": [],
   "source": []
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "Python 3 (ipykernel)",
   "language": "python",
   "name": "python3"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 3
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython3",
   "version": "3.9.12"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 5
}
